import { Camera, Canvas, Color, Node } from "cc";
import OrbitCamera from "../../ctrl/OrbitCamera";
import { PlayerCtrl } from "../../ctrl/PlayerCtrl";
import { ChatType } from "./Enums";

class Global {
    currentChar: number = 0;
    enableShareAd = true;
    screenRatio = 1;
    orbitCam:OrbitCamera  =null;
    canvas:Canvas[]=[];
    cameras:Camera[] = [];
    main:Node = null;
    layers:Node[] = [];
    scenes:Node[] = [];
    Debug = false;
    /* if is game Run time */
    runtime = false;
    /* if game starts */
    start = false;
    /* if the device is mobile */
    isMobile = false;
    /* store performance settings */
    high = false;
    scale = 2;
    playerNode:Node = null;
    /* if Egnlish env */
    isEn = false;
    isOpen = false;
    isGame = false;
    isTalk = false;
    isTyping = false;
    isQuiz = false;
    rScale = 1;
    quizLevel = 1;
    currentLevel = 0;
    coins = 0;
    char:Node = null;
    playerCtrl:PlayerCtrl = null;
    chatMode = ChatType.DAILY;
    LLMurl = '';
    LLMkey = "";
    LLMmodel = "gpt-4-turbo";
    currentStory = "";
    storyScale = 1;
    color0:Color = new Color(10,10,16,255);
    color1:Color = new Color(200,200,200,255);
    isJson = true;

    /* used for game pause */
    Pause(isPause = true) {
        // director.emit(Key.Pause, isPause);
        this.start = !isPause;
    }

}
const globalVarient = new Global;

export default globalVarient;
